
package com.quartz.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * 定时任务
 *
 * @author Mark lin5178@126.com
 */
public class ScheduleJobEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	/**
	 * 任务调度参数key
	 */
    public static final String JOB_PARAM_KEY = "JOB_PARAM_KEY";
	
	/**
	 * 任务id
	 */
	private String jobId = UUID.randomUUID().toString().replaceAll("-","");

	/**
	 * 执行定时任务的class <? extends Job>
	 */
	private Class<?> jobClass;

	/**
	 * 判断是否是有参方法，1 有参 ，0 无参 默认为 0
	 */
	private Integer methodType = 0;
	
	/**
	 * 参数
	 */
	private String params;
	
	/**
	 * cron表达式
	 */
	private String cronExpression;

	/**
	 * 任务状态 默认不启动
	 */
	private Integer status = 1;
	/**
	 * 执行方法
	 */
	private String method;

	/**
	 * 创建时间
	 */
	private Date createTime;

	public String getJobId() {
		return jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	public Class<?> getJobClass() {
		return jobClass;
	}

	public void setJobClass(Class<?> jobClass) {
		this.jobClass = jobClass;
	}

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	public String getCronExpression() {
		return cronExpression;
	}

	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}


	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}


	public Integer getMethodType() {
		return methodType;
	}

	public void setMethodType(Integer methodType) {
		this.methodType = methodType;
	}
}
